var baseUrl = 'http://api_dev.wanxikeji.cn/';
export default (url, data = {}, method = "post") => {
    uni.showLoading({
        title: '加载中'
    })
    return new Promise((resolve, reject) => {
        uni.request({
                url: baseUrl + url,
                method,
                data
            })
            .then(res => resolve(res[1])) // 注意:这里对返回的数据进行的简化
            .catch(err => reject(err))
            .finally(() => uni.hideLoading())
    })
}